package igou.togogo.controller;

import igou.togogo.bean.EBrand;
import igou.togogo.service.IBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/brand")
public class BrandController {

    @Autowired
    IBrandService brandService;

    @RequestMapping("/list")
    public String getBrandList(Model model){
        List<EBrand> list = brandService.getBrandList();
        model.addAttribute("brandList",list);
        return "front_page/product/product";
    }

}
